package com.linskating.wheat.exception;

import com.linskating.wheat.common.ErrorCode;
import lombok.Getter;

@Getter
public class BusinessException extends RuntimeException {

    private final ErrorCode errorCode;
    private final String description;

    public BusinessException(ErrorCode e) {
        super(e.getMessage());
        this.errorCode = e;
        this.description = e.getDescription();
    }

    public BusinessException(ErrorCode e, String description) {
        super(e.getMessage());
        this.errorCode = e;
        this.description = description;
    }
}
